<?php include('all/header.html') ?>
<body class="custom">
	<!-- begin #page-loader -->
	<div id="page-loader" class="fade in"><span class="spinner"></span></div>
	<!-- end #page-loader -->
	
	<!-- begin #page-container -->
	<div id="page-container" class="fade">
		<!-- begin #header -->
		
		<!-- end #header -->
		
		<!-- begin #sidebar -->

		<!-- end #sidebar -->

    			<!-- begin breadcrumb -->
    			
    			<!-- end page-header -->
    			
    			<!-- begin row -->
    			<div class="row">
    			    <!-- begin col-12 -->
    			    <div class="col-md-12">
    			        <!-- begin panel -->
                        <div class="panel panel-inverse">
                            <div class="panel-heading">
                                <div class="panel-heading-btn">
                                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
                                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-repeat"></i></a>
                                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
                                    <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger" data-click="panel-remove"><i class="fa fa-times"></i></a>
                                </div>
                                <h4 class="panel-title"><?php echo $title; ?></h4>
                            </div>
                            <div class="panel-body">
                                
                                <div class="table-responsive">
                                    
                                    <table class="table table-striped table-bordered dataTable" aria-describedby="data-table_info">
                                    	<thead>
                                    		<tr role="row">
                                    			<th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="data-table" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending" style="width: 82px;">公式名称</th>
                                    			<th class="sorting" role="columnheader" tabindex="0" aria-controls="data-table" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 112px;">公式编号</th>
                                    			<th class="sorting" role="columnheader" tabindex="0" aria-controls="data-table" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending" style="width: 68px;">公式算法</th>
                                    			<th class="sorting" role="columnheader" tabindex="0" aria-controls="data-table" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 100px;">公式说明</th>
                                    			
                                    			<th class="sorting" role="columnheader" tabindex="0" aria-controls="data-table" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 47px;">操作</th>
                                    		</tr>
                                    	</thead>

                                    	<tbody role="alert" aria-live="polite" aria-relevant="all">
                                    		
                                    		<!-- <tr class="gradeA odd">
                                    			<td class=" sorting_1">Gecko</td>
                                    			<td class=" ">Netscape Navigator 9</td>
                                    			<td class=" ">Win 98+ / OSX.2+</td>
                                    			<td class=" ">1.8</td>
                                    			<td class=" ">A</td>
                                    		</tr> -->
                                    		<?php

                                    			foreach ($all_cal as $key => $value) {

		                                    		echo '<tr class="gradeA odd">
				                                    			<td class=" sorting_1">'.$value['cal_name'].'</td>
				                                    			<td class=" ">'.$value['cal_number'].'</td>
				                                    			
				                                    			<td class=" ">'.$value['cal_ari'].'</td>
				                                    			<td class=" ">'.$value['cal_info'].'</td>
				                                    			<td class="td_do">
                                                                    <a href="'.config_item("base_url").'admin/user_admin/doRecycleCal?calId='.$value['id'].'&cal_number='.$value['cal_number'].'" title="还原公式"><i class="fa fa-reply "></i>
                                                                    </a>
                                                                    <a href="'.config_item("base_url").'admin/user_admin/comDeleteCal?calId='.$value['id'].'" title="彻底删除"><i class="fa fa-times " onclick="return myconfirm('."'确认永久删除该条公式吗！'".');"></i></a>
                                                                </td>
				                                    	  </tr>';				
                                    			}
                                    		 ?>
                                    	</tbody>
                                    </table>
                                    <div class="row">                                   	
                                    	<div class="paging"></div>
                                    </div>

                                </div>
                            </div>
                        </div>
                        <!-- end panel -->
                    </div>
                    <!-- end col-12 -->
                </div>
                <!-- end row -->
    
		
		<!-- begin scroll to top btn -->
		<a href="javascript:;" class="btn btn-icon btn-circle btn-success btn-scroll-to-top fade" data-click="scroll-top"><i class="fa fa-angle-up"></i></a>
		<!-- end scroll to top btn -->
	</div>

	<!-- end page container -->
	
	<!-- ================== BEGIN BASE JS ================== -->
	<?php include('all/footer.html') ?>
    <script src="<?php echo config_item("admin_static"); ?>js/paging/jquery.simplePagination.js"></script>
    <script>
        // $(document).ready(function() {
        //     App.init();
        //     $(function() {
        //         $('.paging').pagination({
        //             items: 100,
        //             itemsOnPage: 10,
        //             cssStyle: 'light-theme',
        //             currentPage: 5,
        //             hrefTextPrefix: '?page',
        //             prevText: '上一页',
        //             nextText: '下一页'
        //         });
        //     });
        // });
			<?php 
				echo "$(document).ready(function() {
			            $(function() {
			                $('.paging').pagination({
			                    items: ".$total.",
			                    itemsOnPage: ".$pagePer.",
			                    cssStyle: 'light-theme',
			                    currentPage: ".$currentPage.",
			                    hrefTextPrefix: '?page=',
			                    prevText: '上一页',
			                    nextText: '下一页'
			                });
			            });
			        })";
			?>
    </script>
    </body>
</html>
